package ahblue.cn.tanzi.model.user;

import android.content.Context;
import android.widget.Toast;

import ahblue.cn.tanzi.data.source.ApiCallback;
import ahblue.cn.tanzi.data.source.RemoteRepository;

/**
 * Created by fengdongfei on 2018/12/15.
 */

public class PackageModel {

    /**
     * member_deposit : 0.00
     * freeze_amount : 0.00
     * apply_amount : 0.00
     *
     * 用户余额，带结算，申请提现金额
     */

    public String member_deposit;
    public String freeze_amount;
    public String apply_amount;

    public static void getPayMoney(final Context context , String token, final DataVertifyListener loginListener){
        RemoteRepository repo = RemoteRepository.getsInstance();
        repo.getMoneyDetail(token, new ApiCallback<PackageModel>(){
            @Override
            public void onSuccess(PackageModel data) {
                if (null!=loginListener){
                    loginListener.conver(data);
                }
            }

            @Override
            public void onFailed(String errorMsg) {
                Toast.makeText(context,errorMsg,Toast.LENGTH_LONG).show();
                if (null!=loginListener){
                    loginListener.conver(null);
                }
            }
        });
    }


    public interface DataVertifyListener {
        void conver(PackageModel data);
    }


}
